package com.usian.Controller;

import com.usian.pojo.TbItem;
import com.usian.pojo.TbItemCat;
import com.usian.service.ItemCateService;
import com.usian.service.ItemService;
import com.usian.utils.CateGroup;
import com.usian.utils.FengZ;
import com.usian.utils.PageResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class ItemCateController {
    @Autowired
    private ItemCateService itemCateService;

    @RequestMapping("selectItemCategoryByParentId")
    public List<TbItemCat> selectItemCategoryByParentId(@RequestParam Integer id){
        return itemCateService.selectItemCategoryByParentId(id);

    };

    @RequestMapping("selectItemCategoryAll")
    public FengZ selectItemCategoryAll(){
        return itemCateService.selectItemCategoryAll();
    };

}
